<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <title>标签页</title>
    <link rel="stylesheet" href="../../static/css/me.css" th:href="@{/css/me.css}">
    <link rel="stylesheet" href="https://unpkg.com/semantic-ui@2.4.2/dist/semantic.min.css">
    <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
</head>
<body>
<!--导航-->
<nav class="ui inverted attached segment m-padded-tb-mini"><!--css  m-padded-tb-mini自定义上下间隔减小-->
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Social Rescue Forces Sys.</h2>
            <a href="forces.html" th:href="@{/admin/forces}" class="m-item item m-mobile-hide"><i class="home icon"></i>Forces</a>
            <a href="message.html" th:href="@{/admin/message}" class="m-item item m-mobile-hide"><i class="idea icon"></i>Skill&News</a>
            <a href="types.html" th:href="@{/admin/types}" class="active m-item item m-mobile-hide"><i class="tags icon"></i>Types</a>
            <div class="right m-item m-mobile-hide menu">
                <div class="ui dropdown item">
                    <div class="text">
                        <img src="https://picsum.photos/id/1005/100/100" alt="" class="ui avatar image" th:src="@{${session.user.avatar}}">
                        <span th:text="${session.user.nickname}">刘顺</span>
                    </div>
                    <i class="dropdown icon"></i>
                    <div class="menu">
                        <a href="#" th:href="@{/admin/logout}" class="item">注销</a>
                    </div>
                </div>
            </div>
            <a th:href="@{/}" class="m-item item m-mobile-hide"><i class="arrow circle left icon"></i></a>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
        <i class="sidebar icon"></i>
    </a>
</nav>

<div class="ui inverted attached pointing menu">
    <div class="ui container">
        <div class="right menu">
            <a href="types-input.html" th:href="@{/admin/types/input}" class="teal item">新增</a>
            <a href="types.html" th:href="@{/admin/types}" class="teal active item">列表</a>
        </div>
    </div>
</div>
<!--中间内容-->
<div class="m-container-small m-padded-tb-big">
    <div class="ui container">

        <table class="ui table">
            <thead>
            <tr>
                <th></th>
                <th>名称</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="type, iterStat : ${pageInfo.list}">
                <td th:text="${iterStat.count}">1</td>
                <td th:text="${type.name}">火灾救援</td>
                <td>
                    <a href="#" th:href="@{/admin/types/{id}/input(id=${type.id})}"
                       class="ui mini teal basic button">编辑</a>
                    <a href="#" th:href="@{/admin/types/{id}/delete(id=${type.id})}"
                       class="ui mini red basic button">删除</a>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <th colspan="7">
                    <div class="ui mini pagination menu">
                        <div class="item"><a th:href="@{/admin/types}">首页</a></div>
                        <div class="item"><a th:href="@{/admin/types(pagenum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}" th:text="${pageInfo.hasPreviousPage} ? 'Pre' : '已到首页'">上一页</a></div>
                        <div class="item"><a th:href="@{/admin/types(pagenum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}" th:text="${pageInfo.hasNextPage} ? 'Next' : '已到尾页'">下一页</a></div>
                        <div class="item"><a th:href="@{/admin/types(pagenum=${pageInfo.pages})}">尾页</a></div>
                    </div>
                    <a href="types-input.html" th:href="@{/admin/types/input}"
                       class="ui right floated teal basic button">新增</a>
                </th>
            </tr>
            </tfoot>
        </table>
        <div class="ui success message" th:unless="${#strings.isEmpty(msg)}">
            <i class="close icon"></i>
            <div class="header">提示：</div>
            <p th:text="${msg}">恭喜，操作成功！</p>
        </div>
    </div>
</div>

<br>
<br>
<br>

<!--底部-->
<footer class="ui inverted vertical segment m-padded-t-massive">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img src="../static/images/wechat.jpg" th:src="@{/images/wechat.jpg}"
                             class="ui rounded image" alt="" style="width: 110px">
                    </div>
                </div>
            </div>
            <div class="two wide column">
                <h4 class="ui inverted header">Skills</h4>
                <div class="skill-container">
                    <div class="ui two column stackable grid">
                        <div class="column">
                            <div class="ui inverted link list">
                                <a href="#" th:href="@{/detail-skill/1}" target="_blank" class="item">火灾</a>
                                <a href="#" th:href="@{/detail-skill/2}" class="item">地震</a>
                                <a href="#" th:href="@{/detail-skill/3}" class="item">暴风雨</a>
                            </div>
                        </div>
                        <div class="column">
                            <div class="ui inverted link list">
                                <a href="#" th:href="@{/detail-skill/4}" target="_blank" class="item">泥石流</a>
                                <a href="#" th:href="@{/detail-skill/5}" class="item">海啸</a>
                                <a href="#" th:href="@{/detail-skill/6}" class="item">雷震</a>
                            </div>
                        </div>

                    </div>

                </div>
            </div>
            <div class="four wide column">
                <h4 class="ui inverted header">Contact me</h4>
                <div class="ui divider"></div>
                <div class="ui inverted link list">
                    <a href="#" class="item">WeChat 18131605102</a>
                    <a href="#" class="item">Email 2194510807@qq.com</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header">Link</h4>
                <div class="ui small images">
                    <a href="https://www.mem.gov.cn/" class="ui image">
                        <img src="../static/images/guojia.png" th:src="@{/images/guojia.png}">
                    </a>
                    <a href="http://eeh.emerinfo.cn/dist/#/home" class="ui image">
                        <img src="../static/images/yingji.png" th:src="@{/images/yingji.png}">
                    </a>
                    <a href="http://120.39.net/" class="ui image">
                        <img src="../static/images/39.png" th:src="@{/images/39.png}">
                    </a>
                    <a href="https://www.beijing120.com/" class="ui image">
                        <img src="../static/images/beijing120.png" th:src="@{/images/beijing120.png}">
                    </a>
                    <a href="http://yjt.shandong.gov.cn/" class="ui image">
                        <img src="../static/images/shandong.png" th:src="@{/images/shandong.png}">
                    </a>
                    <a href="http://yjglj.beijing.gov.cn/" class="ui image">
                        <img src="../static/images/beijing.png" th:src="@{/images/beijing.png}">
                    </a>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-spaced m-opacity-mini">Copyright &copy; 2022 Khan Designed by Liushun</p>
    </div>

</footer>

<script src="https://unpkg.com/jquery@3.5.1/dist/jquery.min.js"></script>
<script src="https://unpkg.com/semantic-ui@2.4.2/dist/semantic.min.js"></script>

<script th:inline="javascript">

    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });
    $('.ui.dropdown').dropdown({
        on: 'hover'
    });
    $('.message .close')
        .on('click', function () {
            $(this)
                .closest('.message')
                .transition('fade');
        });
</script>

</body>
</html>